/**
 * 跑马灯
 * @params datasets 数据
 */
export function carouselFormat(datasets) {
  let seriesData = [];
  const { type, source, dimensions } = datasets;
  if (type === 'STATIC') {
    seriesData = source;
  }
  else{
    seriesData = datasets.source.map((item) => ({
      title: item[dimensions.xAxis],
    }));
  }
  return {
    seriesData,
  };
}